﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SaleOnlineSystem.Controls
{
    public partial class SearchBox : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                txtSearch.Attributes.Add("onkeypress", "return clickButton(event,'" + btnSearch.ClientID + "')");               
            }
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            string contentSearch = txtSearch.Text;
            if (contentSearch != "")
            {
                string s = LIB.Converter.convertParam(contentSearch);
                Response.Redirect("/content/" + s + "/timkiem.htm");
            }
        }
    }
}